package com.logistics.utils.bean;

import com.logistics.account.entity.domain.Account;
import lombok.Data;

@Data
public class UserBean {

    private String userId;

    private String userName;

    private String erpUserId;

    private String erpDeptCode;

    private String userCode;

    private String account;

    private String organization;

    private String dep;

    private String post;

    private String erpUniqueId;

    public UserBean(){
    }

    public UserBean(Account account){
        this.userId = account.getId().toString();
        this.userName = account.getUserName();
        this.userCode = account.getCode();
        this.organization = account.getOrganization();
        this.account = account.getAccount();
        this.dep = account.getDep();
        this.post = account.getPost();
        this.erpUserId = account.getErpUserId();
        this.erpDeptCode = account.getErpDeptCode();
        this.erpUniqueId = account.getErpUniqueId();
    }

    public static UserBean build(Account account){
        return new UserBean(account);
    }
}
